package com.hfjyz.registration.controller;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.validation.Errors;
import org.springframework.web.servlet.mvc.SimpleFormController;

import com.hfjyz.registration.command.ExamCountListCommand;
import com.hfjyz.registration.service.ExamCountService;

public class ExamCountListController extends SimpleFormController {

    private ExamCountService examCountService;

    /*
     * (non-Javadoc)
     * 
     * @see org.springframework.web.servlet.mvc.AbstractWizardFormController#
     * referenceData(javax.servlet.http.HttpServletRequest, java.lang.Object,
     * org.springframework.validation.Errors, int)
     */
    @SuppressWarnings("rawtypes")
    @Override
    protected Map referenceData(HttpServletRequest request, Object command,
            Errors errors) throws Exception {
        ExamCountListCommand cmd = (ExamCountListCommand) command;
        return examCountService.initExamCountInfo(cmd, errors);
    }

    public ExamCountService getExamCountService() {
        return examCountService;
    }

    public void setExamCountService(ExamCountService examCountService) {
        this.examCountService = examCountService;
    }

}